// 如果没有通过拦截器配置域名的话，可以在这里写上完整的URL(加上域名部分)
let loginurl = '/api/login'; //登录
let register = '/api/register'; //注册
let validate = '/api/get_validate_code'; //获取图形验证码
let sendsms = '/api/send_sms_code'; //获取手机验证码
let updatepass = '/api/update_pass'; //修改密码
let userinfo = '/admin/get_user_info'; //用户信息
let uploadurl = '/api/upload' //公共-上传
let uploadbase = '/api/upload_base' //公共-base64上传

let todayinfo = '/admin/get_today_info'; // // 首页---获取用户实时数据接口
let estimateprice = '/admin/get_estimate_price'; //获取用户预估服务费接口
let banner = '/admin/get_header_select'; //获取banner

let activityinfo = '/admin/get_activity_info'; // //招商---活动获取活动标题接口
let activitylist = '/admin/get_activity_list'; //获取活动列表接口
let addactivity = '/admin/add_activity'; //申请活动
let unionuser = '/admin/get_union_user'; //联盟账号接口

let adoptgoods = '/admin/get_adopt_goods'; // //招商---用户获取通过商品接口
let examinegoods = '/admin/get_examine_goods'; // //招商---用户获取通过商品接口
let auditgoods = '/admin/examine_goods'; //审核商品(通过, 拒绝)
let rateUrl = '/api/get_goods_commission' //佣金查询

let servicerank = '/admin/user_service_price'; //服务费排行榜

let leturerurl = '/admin/get_lecturer_list' //首页-获取讲师列表
let currclass = '/admin/curriculum_class' //首页-课程分类
let currlist = '/admin/curriculum_list' //首页-课程列表

let baogoods = '/admin/get_goods_info' //淘圈-读取爆款商品
let sucaigoods = '/api/get_source_list' //淘圈-读取素材商品
let forward = '/admin/goods_forward' //淘圈-转发推荐
let forward2 = '/api/add_forward_num' //淘圈-转发素材

let getproblem = '/admin/get_problem_list' //知识库-获取问题列表
let getanswer = '/admin/get_answer_list' //知识库-获取问题答案
let answerquest = '/admin/question_answering' //知识库-回答问题
let addproblem = '/admin/add_problem' //知识库-发布问题接口

let caseclass = '/admin/get_class_info' //案例库-读取案例分类
let caselist = '/admin/get_case_list' //案例库-读取案例列表
let caseinfo = '/admin/get_case_detail' //案例库-读取案例详情
let addlike = '/admin/add_zan' //案例库-点赞
let addcaseinfo = '/admin/add_case_info' //案例库-发布案例

let userdata = '/admin/get_month_service' //我的-读取本月/上月用户服务费数据接口
let paodangoods = '/admin/get_pao_dan_goods' //我的-商品管理
let personalservice = '/admin/get_personal_service' //我的-个人中心服务费概览数据接口
let updateuserimgurl = '/admin/update_user_img' //我的-设置用户头像

let checkitemid = "admin/check_item_insert" //招商管理-检测商品是否可以录入接口
let cateurl = "http://zsxt.letuilm.com/api/tool/getGoodsCate" //招商管理-获取商品类目接口
let update = "http://zsxt.letuilm.com/api/tool/appVersion" //更新
let checkcoupon = "/api/check_coupon_info" //上单-检测优惠卷
let upgoods = "/admin/add_pao_dan_goods" //上单-录入

let rebaterel = "/admin/rebate_goods_search" //商品返利-搜索
let goodsdetail = "/admin/rebate_goods_detail" //商品返利-查询详情
let chainurl = "/admin/user_chain_change" //商品返利-创建分享
let repeaturl = "/admin/get_find_pass_info" //上单 ---续单
let passgoodsurl = "/admin/update_pass_goods" //上单 ---编辑

let issueurl = "/admin/user_issue" //出单 ---用户实时出单接口
let rebateprourl = "/admin/get_rebate_proportion" //获取系统分成比例
let textdata = "/admin/search_text_data" //首页--剪切板搜索商品
let userorder = "/admin/get_user_order_info" //返利 补贴数据
let searchuserdata = "/admin/get_search_user_data" //返利 预估结算补贴
let setCookie = "https://zsxt.letuilm.com/api/activity/setX5sec" //更新cookie


const install = (Vue, vm) => {
	// 登录
	let dologin = (params = {}) => vm.$u.post(loginurl, params);
	// 注册
	let doregister = (params = {}) => vm.$u.post(register, params);
	// 获取图形验证码
	let getValidateCode = (params = {}) => vm.$u.get(validate, params);
	// 获取手机验证码
	let getSmsCode = (params = {}) => vm.$u.post(sendsms, params);
	// 修改密码
	let updatePass = (params = {}) => vm.$u.post(updatepass, params);
	// 获取用户信息
	let getuserinfo = (params = {}) => vm.$u.get(userinfo, params);
	// 获取用户实时数据接口
	let gettodayinfo = (params = {}) => vm.$u.get(todayinfo, params);
	// 获取用户预估服务费接口
	let getestimateprice = (params = {}) => vm.$u.get(estimateprice, params);
	// 获取banner
	let getbannerlist = (params = {}) => vm.$u.get(banner, params);
	//获取活动标题接口
	let getactivityinfo = (params = {}) => vm.$u.get(activityinfo, params);
	//获取活动列表
	let getactivitylist = (params = {}) => vm.$u.get(activitylist, params);
	//新增活动
	let doaddactivity = (params = {}) => vm.$u.post(addactivity, params);
	//获取可用的联盟账号接口
	let getunionuser = (params = {}) => vm.$u.get(unionuser, params);
	//用户获取通过商品接口
	let getadoptgoods = (params = {}) => vm.$u.get(adoptgoods, params);
	//获取服务费排行榜
	let getservicerank = (params = {}) => vm.$u.get(servicerank, params);
	//获取审核商品
	let getexaminegoods = (params = {}) => vm.$u.get(examinegoods, params);
	//审核商品(过, 拒)
	let doauditgoods = (params = {}) => vm.$u.post(auditgoods, params);
	//获取讲师列表
	let getleturerlist = (params = {}) => vm.$u.get(leturerurl, params);
	//读取爆款商品
	let getbaogoods = (params = {}) => vm.$u.get(baogoods, params);
	//读取素材商品
	let getsucaigoods = (params = {}) => vm.$u.get(sucaigoods, params);
	//读取课程分类
	let getcurrclass = (params = {}) => vm.$u.get(currclass, params);
	//读取课程列表
	let getcurrlist = (params = {}) => vm.$u.get(currlist, params);
	//淘圈 转发
	let doforward = (params = {}) => vm.$u.post(forward, params);
	//淘圈 转发素材
	let doforward2 = (params = {}) => vm.$u.post(forward2, params);
	//上传
	let doupload = (params = {}) => vm.$u.post(uploadurl, params);
	//佣金查询
	let getGoodsRate = (params = {}) => vm.$u.get(rateUrl, params);
	//知识库-获取问题列表
	let getproblemList = (params = {}) => vm.$u.get(getproblem, params);
	//知识库-获取问题答案
	let getanswerList = (params = {}) => vm.$u.get(getanswer, params);
	//知识库-回答问题
	let answerquestion = (params = {}) => vm.$u.post(answerquest, params);
	//知识库-发布问题
	let doaddproblem = (params = {}) => vm.$u.post(addproblem, params);
	//案例库-读取案例分类
	let getcaseclass = (params = {}) => vm.$u.get(caseclass, params);
	//案例库-读取案例列表
	let getcaselist = (params = {}) => vm.$u.get(caselist, params);
	//案例库-读取案例详情
	let getcaseinfo = (params = {}) => vm.$u.get(caseinfo, params);
	//案例库-点赞
	let doaddlike = (params = {}) => vm.$u.post(addlike, params);
	//案例库-发布案例
	let doaddcaseinfo = (params = {}) => vm.$u.post(addcaseinfo, params);
	//我的-用户服务费数据
	let getuserdata = (params = {}) => vm.$u.get(userdata, params);
	//我的-商品管理
	let getpaodangoods = (params = {}) => vm.$u.get(paodangoods, params);
	//招商管理-检测商品是否可以录入接口
	let docheckitemid = (params = {}) => vm.$u.get(checkitemid, params);
	//上单 分类
	let getcate = (params = {}) => vm.$u.get(cateurl, params);
	//更新
	let getupdate = (params = {}) => vm.$u.get(update, params);
	//上单 -检测优惠卷
	let getcouponinfo = (params = {}) => vm.$u.post(checkcoupon, params);
	//上单 -录入
	let doupgoods = (params = {}) => vm.$u.post(upgoods, params);
	//商品返利-搜索
	let dorebaterel = (params = {}) => vm.$u.get(rebaterel, params);
	//商品返利-商品详情
	let getgoodsdetail = (params = {}) => vm.$u.get(goodsdetail, params);
	//商品返利-创建分享
	let makeshare = (params = {}) => vm.$u.get(chainurl, params);
	//公共--base64上传
	let douploadbase = (params = {}) => vm.$u.post(uploadbase, params);
	//上单---续单
	let dorepeat = (params = {}) => vm.$u.get(repeaturl, params);
	//上单---编辑
	let dochangegoods = (params = {}) => vm.$u.post(passgoodsurl, params);
	//我的-个人中心服务费概览数据接口
	let getpersonalservice = (params = {}) => vm.$u.get(personalservice, params);
	//我的-设置头像
	let updateuserimg = (params = {}) => vm.$u.post(updateuserimgurl, params);
	//出单- 实时出单
	let getissuelist = (params = {}) => vm.$u.get(issueurl, params);
	//获取用户系统分成
	let getrebateprourl = (params = {}) => vm.$u.get(rebateprourl, params);
	//获取用户系统分成
	let gettextdata = (params = {}) => vm.$u.get(textdata, params);
	//获取用户补贴数据
	let getuserorder = (params = {}) => vm.$u.get(userorder, params);
	//获取用户 预估 结算 补贴
	let getsearchuserdata = (params = {}) => vm.$u.get(searchuserdata, params);
	let dosetCookie = (params = {}) => vm.$u.get(setCookie, params);


	vm.$u.api = {
		doupload,
		dologin,
		doregister,
		getValidateCode,
		getSmsCode,
		updatePass,
		getuserinfo,
		gettodayinfo,
		getestimateprice,
		getbannerlist,
		getactivityinfo,
		getactivitylist,
		doaddactivity,
		getunionuser,
		getadoptgoods,
		getservicerank,
		getexaminegoods,
		doauditgoods,
		getleturerlist,
		getbaogoods,
		getsucaigoods,
		getcurrclass,
		getcurrlist,
		doforward,
		doforward2,
		getGoodsRate,
		getproblemList,
		getanswerList,
		answerquestion,
		doaddproblem,
		getcaseclass,
		getcaselist,
		getcaseinfo,
		doaddlike,
		doaddcaseinfo,
		getuserdata,
		getpaodangoods,
		docheckitemid,
		getcate,
		getupdate,
		getcouponinfo,
		doupgoods,
		dorebaterel,
		getgoodsdetail,
		makeshare,
		douploadbase,
		dorepeat,
		dochangegoods,
		getpersonalservice,
		updateuserimg,
		getissuelist,
		getrebateprourl,
		gettextdata,
		getuserorder,
		getsearchuserdata,
		dosetCookie,
	};
}

export default {
	install
}
